package com.mashibing.tomcat;

import java.io.IOException;

/**
 * @Auther: dy
 * @Date: 2022/1/1 - 01 - 01 - 21:04
 * @Description: Servlet applet程序 --> 根据请求信息,做出相对应的响应
 * @version: 1.0
 */
public class MyServlet extends MyHttpServlet{

    @Override
    public void doGET(MyRequest myRequest, MyResponse myResponse) {
        try {
            myResponse.write("my get tomcat");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    @Override
    public void doPOST(MyRequest myRequest, MyResponse myResponse) {
        try {
            myResponse.write("my post tomcat");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    @Override
    public String toString() {
        return "MyServlet";
    }
}
